3.5.32 \(\int \frac {1-x}{\sqrt {x} (1+x^2)} \, dx\) [432]

Optimal. Leaf size=45 \[ -\frac {\log \left (1-\sqrt {2} \sqrt {x}+x\right )}{\sqrt {2}}+\frac {\log \left (1+\sqrt {2} \sqrt {x}+x\right )}{\sqrt {2}} \]

[Out]

-1/2*ln(1+x-2^(1/2)*x^(1/2))*2^(1/2)+1/2*ln(1+x+2^(1/2)*x^(1/2))*2^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {841, 1179, 642} \begin {gather*} \frac {\log \left (x+\sqrt {2} \sqrt {x}+1\right )}{\sqrt {2}}-\frac {\log \left (x-\sqrt {2} \sqrt {x}+1\right )}{\sqrt {2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(1 - x)/(Sqrt[x]*(1 + x^2)),x]

[Out]

-(Log[1 - Sqrt[2]*Sqrt[x] + x]/Sqrt[2]) + Log[1 + Sqrt[2]*Sqrt[x] + x]/Sqrt[2]

Rule 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[d*(Log[RemoveContent[a + b*x +
c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 841

Int[((f_.) + (g_.)*(x_))/(Sqrt[(d_.) + (e_.)*(x_)]*((a_) + (c_.)*(x_)^2)), x_Symbol] :> Dist[2, Subst[Int[(e*f
 - d*g + g*x^2)/(c*d^2 + a*e^2 - 2*c*d*x^2 + c*x^4), x], x, Sqrt[d + e*x]], x] /; FreeQ[{a, c, d, e, f, g}, x]
 && NeQ[c*d^2 + a*e^2, 0]

Rule 1179

Int[((d_) + (e_.)*(x_)^2)/((a_) + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[-2*(d/e), 2]}, Dist[e/(2*c*q), Int[
(q - 2*x)/Simp[d/e + q*x - x^2, x], x], x] + Dist[e/(2*c*q), Int[(q + 2*x)/Simp[d/e - q*x - x^2, x], x], x]] /
; FreeQ[{a, c, d, e}, x] && EqQ[c*d^2 - a*e^2, 0] && NegQ[d*e]

Rubi steps

\begin {align*} \int \frac {1-x}{\sqrt {x} \left (1+x^2\right )} \, dx &=2 \text {Subst}\left (\int \frac {1-x^2}{1+x^4} \, dx,x,\sqrt {x}\right )\\ &=-\frac {\text {Subst}\left (\int \frac {\sqrt {2}+2 x}{-1-\sqrt {2} x-x^2} \, dx,x,\sqrt {x}\right )}{\sqrt {2}}-\frac {\text {Subst}\left (\int \frac {\sqrt {2}-2 x}{-1+\sqrt {2} x-x^2} \, dx,x,\sqrt {x}\right )}{\sqrt {2}}\\ &=-\frac {\log \left (1-\sqrt {2} \sqrt {x}+x\right )}{\sqrt {2}}+\frac {\log \left (1+\sqrt {2} \sqrt {x}+x\right )}{\sqrt {2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 23, normalized size = 0.51 \begin {gather*} \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {x}}{1+x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(1 - x)/(Sqrt[x]*(1 + x^2)),x]

[Out]

Sqrt[2]*ArcTanh[(Sqrt[2]*Sqrt[x])/(1 + x)]

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(111\) vs. \(2(34)=68\).
time = 0.55, size = 112, normalized size = 2.49

method result size
trager \(\frac {\RootOf \left (\textit {\_Z}^{2}-2\right ) \ln \left (\frac {\RootOf \left (\textit {\_Z}^{2}-2\right ) x^{2}+4 \RootOf \left (\textit {\_Z}^{2}-2\right ) x +4 x^{\frac {3}{2}}+\RootOf \left (\textit {\_Z}^{2}-2\right )+4 \sqrt {x}}{x^{2}+1}\right )}{2}\) \(54\)
derivativedivides \(\frac {\sqrt {2}\, \left (\ln \left (\frac {1+x +\sqrt {2}\, \sqrt {x}}{1+x -\sqrt {2}\, \sqrt {x}}\right )+2 \arctan \left (\sqrt {2}\, \sqrt {x}+1\right )+2 \arctan \left (\sqrt {2}\, \sqrt {x}-1\right )\right )}{4}-\frac {\sqrt {2}\, \left (\ln \left (\frac {1+x -\sqrt {2}\, \sqrt {x}}{1+x +\sqrt {2}\, \sqrt {x}}\right )+2 \arctan \left (\sqrt {2}\, \sqrt {x}+1\right )+2 \arctan \left (\sqrt {2}\, \sqrt {x}-1\right )\right )}{4}\) \(112\)
default \(\frac {\sqrt {2}\, \left (\ln \left (\frac {1+x +\sqrt {2}\, \sqrt {x}}{1+x -\sqrt {2}\, \sqrt {x}}\right )+2 \arctan \left (\sqrt {2}\, \sqrt {x}+1\right )+2 \arctan \left (\sqrt {2}\, \sqrt {x}-1\right )\right )}{4}-\frac {\sqrt {2}\, \left (\ln \left (\frac {1+x -\sqrt {2}\, \sqrt {x}}{1+x +\sqrt {2}\, \sqrt {x}}\right )+2 \arctan \left (\sqrt {2}\, \sqrt {x}+1\right )+2 \arctan \left (\sqrt {2}\, \sqrt {x}-1\right )\right )}{4}\) \(112\)
meijerg \(-\frac {\sqrt {x}\, \sqrt {2}\, \ln \left (1-\sqrt {2}\, \left (x^{2}\right )^{\frac {1}{4}}+\sqrt {x^{2}}\right )}{4 \left (x^{2}\right )^{\frac {1}{4}}}+\frac {\sqrt {x}\, \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \left (x^{2}\right )^{\frac {1}{4}}}{2-\sqrt {2}\, \left (x^{2}\right )^{\frac {1}{4}}}\right )}{2 \left (x^{2}\right )^{\frac {1}{4}}}+\frac {\sqrt {x}\, \sqrt {2}\, \ln \left (1+\sqrt {2}\, \left (x^{2}\right )^{\frac {1}{4}}+\sqrt {x^{2}}\right )}{4 \left (x^{2}\right )^{\frac {1}{4}}}+\frac {\sqrt {x}\, \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \left (x^{2}\right )^{\frac {1}{4}}}{2+\sqrt {2}\, \left (x^{2}\right )^{\frac {1}{4}}}\right )}{2 \left (x^{2}\right )^{\frac {1}{4}}}-\frac {x^{\frac {3}{2}} \sqrt {2}\, \ln \left (1-\sqrt {2}\, \left (x^{2}\right )^{\frac {1}{4}}+\sqrt {x^{2}}\right )}{4 \left (x^{2}\right )^{\frac {3}{4}}}-\frac {x^{\frac {3}{2}} \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \left (x^{2}\right )^{\frac {1}{4}}}{2-\sqrt {2}\, \left (x^{2}\right )^{\frac {1}{4}}}\right )}{2 \left (x^{2}\right )^{\frac {3}{4}}}+\frac {x^{\frac {3}{2}} \sqrt {2}\, \ln \left (1+\sqrt {2}\, \left (x^{2}\right )^{\frac {1}{4}}+\sqrt {x^{2}}\right )}{4 \left (x^{2}\right )^{\frac {3}{4}}}-\frac {x^{\frac {3}{2}} \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \left (x^{2}\right )^{\frac {1}{4}}}{2+\sqrt {2}\, \left (x^{2}\right )^{\frac {1}{4}}}\right )}{2 \left (x^{2}\right )^{\frac {3}{4}}}\) \(276\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1-x)/(x^2+1)/x^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/4*2^(1/2)*(ln((1+x+2^(1/2)*x^(1/2))/(1+x-2^(1/2)*x^(1/2)))+2*arctan(2^(1/2)*x^(1/2)+1)+2*arctan(2^(1/2)*x^(1
/2)-1))-1/4*2^(1/2)*(ln((1+x-2^(1/2)*x^(1/2))/(1+x+2^(1/2)*x^(1/2)))+2*arctan(2^(1/2)*x^(1/2)+1)+2*arctan(2^(1
/2)*x^(1/2)-1))

________________________________________________________________________________________

Maxima [A]
time = 0.50, size = 34, normalized size = 0.76 \begin {gather*} \frac {1}{2} \, \sqrt {2} \log \left (\sqrt {2} \sqrt {x} + x + 1\right ) - \frac {1}{2} \, \sqrt {2} \log \left (-\sqrt {2} \sqrt {x} + x + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1-x)/(x^2+1)/x^(1/2),x, algorithm="maxima")

[Out]

1/2*sqrt(2)*log(sqrt(2)*sqrt(x) + x + 1) - 1/2*sqrt(2)*log(-sqrt(2)*sqrt(x) + x + 1)

________________________________________________________________________________________

Fricas [A]
time = 3.29, size = 33, normalized size = 0.73 \begin {gather*} \frac {1}{2} \, \sqrt {2} \log \left (\frac {2 \, \sqrt {2} {\left (x + 1\right )} \sqrt {x} + x^{2} + 4 \, x + 1}{x^{2} + 1}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1-x)/(x^2+1)/x^(1/2),x, algorithm="fricas")

[Out]

1/2*sqrt(2)*log((2*sqrt(2)*(x + 1)*sqrt(x) + x^2 + 4*x + 1)/(x^2 + 1))

________________________________________________________________________________________

Sympy [A]
time = 0.46, size = 49, normalized size = 1.09 \begin {gather*} - \frac {\sqrt {2} \log {\left (- 4 \sqrt {2} \sqrt {x} + 4 x + 4 \right )}}{2} + \frac {\sqrt {2} \log {\left (4 \sqrt {2} \sqrt {x} + 4 x + 4 \right )}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1-x)/(x**2+1)/x**(1/2),x)

[Out]

-sqrt(2)*log(-4*sqrt(2)*sqrt(x) + 4*x + 4)/2 + sqrt(2)*log(4*sqrt(2)*sqrt(x) + 4*x + 4)/2

________________________________________________________________________________________

Giac [A]
time = 0.57, size = 34, normalized size = 0.76 \begin {gather*} \frac {1}{2} \, \sqrt {2} \log \left (\sqrt {2} \sqrt {x} + x + 1\right ) - \frac {1}{2} \, \sqrt {2} \log \left (-\sqrt {2} \sqrt {x} + x + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1-x)/(x^2+1)/x^(1/2),x, algorithm="giac")

[Out]

1/2*sqrt(2)*log(sqrt(2)*sqrt(x) + x + 1) - 1/2*sqrt(2)*log(-sqrt(2)*sqrt(x) + x + 1)

________________________________________________________________________________________

Mupad [B]
time = 0.13, size = 20, normalized size = 0.44 \begin {gather*} \sqrt {2}\,\mathrm {atanh}\left (\frac {8\,\sqrt {2}\,\sqrt {x}}{8\,x+8}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(x - 1)/(x^(1/2)*(x^2 + 1)),x)

[Out]

2^(1/2)*atanh((8*2^(1/2)*x^(1/2))/(8*x + 8))

________________________________________________________________________________________